/* ScriptManager 组件样式 */

.scriptManagerLayout {
  height: 100%;
  background: transparent;
}

.sider {
  position: relative;
  overflow: auto;
  transition: all 0.3s ease;
}

.siderContent {
  height: 100%;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
}

.siderHeader {
  margin-bottom: 12px;
  text-align: right;
}

.siderBody {
  flex: 1;
  overflow: hidden;
}

.content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 16px 16px 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.toolbarLeft {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toolbarTitle {
  font-weight: 500;
  font-size: 16px;
}

.toolbarStats {
  margin-left: 8px;
  color: #666;
  font-size: 14px;
}

.searchCard {
  margin-bottom: 16px;
  border-radius: 8px;
}

.scriptToolbarCard {
  margin-bottom: 16px;
  border-radius: 8px;
}

.scriptListCard {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
}

.scriptListCardBody {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.scriptListContainer {
  flex: 1;
  overflow: hidden;
}

/* 脚本项样式 */
.scriptItem {
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.scriptItem:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scriptItem.active {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.scriptItem.selected {
  background-color: #f6ffed;
  border-color: #52c41a;
}

.scriptItemContent {
  padding: 12px 16px;
}

.scriptItemHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.scriptItemIcon {
  font-size: 16px;
  color: #1890ff;
}

.scriptItemName {
  font-size: 14px;
  font-weight: 500;
}

.scriptItemDescription {
  margin: 4px 0 0 0;
  color: #666;
  font-size: 12px;
}

.scriptItemTags {
  margin-top: 8px;
}

.scriptItemMeta {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.scriptItemActions {
  display: flex;
  gap: 8px;
}

/* 批量选择工具栏 */
.bulkSelectionToolbar {
  padding: 8px 16px;
  background-color: #f0f9ff;
  border-bottom: 1px solid #e6f7ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 文件夹树样式 */
.folderTree {
  height: 100%;
}

.folderTreeNode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 4px;
}

.folderTreeNodeLeft {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.folderTreeNodeIcon {
  color: #1890ff;
}

.folderTreeNodeName {
  max-width: 150px;
}

.folderTreeNodeActions {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.folderTreeNode:hover .folderTreeNodeActions {
  opacity: 1;
}

/* 搜索和过滤器样式 */
.searchAndFilter {
  width: 100%;
}

.searchInput {
  width: 100%;
}

.tagSelect {
  width: 100%;
}

.sortSelect {
  width: 120px;
}

.filterButton {
  position: relative;
}

.filterBadge {
  position: absolute;
  top: -8px;
  right: -8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sider {
    position: absolute;
    z-index: 100;
    height: 100%;
  }
  
  .content {
    padding: 0 8px 8px 8px;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .toolbarLeft {
    width: 100%;
    justify-content: space-between;
  }
  
  .searchCard,
  .scriptToolbarCard {
    margin-bottom: 8px;
  }
}

/* 暗色主题适配 */
[data-theme='dark'] .toolbar {
  border-bottom-color: #303030;
}

[data-theme='dark'] .scriptItem.selected {
  background-color: #162312;
  border-color: #389e0d;
}

[data-theme='dark'] .bulkSelectionToolbar {
  background-color: #111b26;
  border-bottom-color: #1c3a5c;
}

/* 拖拽样式 */
.dragging {
  opacity: 0.5;
}

.dropTarget {
  background-color: #e6f7ff;
  border: 2px dashed #1890ff;
}

/* 动画效果 */
.fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slideIn {
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* 滚动条样式 */
.customScrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.customScrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.customScrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.customScrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

[data-theme='dark'] .customScrollbar::-webkit-scrollbar-track {
  background: #2f2f2f;
}

[data-theme='dark'] .customScrollbar::-webkit-scrollbar-thumb {
  background: #555;
}

[data-theme='dark'] .customScrollbar::-webkit-scrollbar-thumb:hover {
  background: #777;
}